home *** CD-ROM | disk | FTP | other *** search
/ Quarterdeck InternetSuite / Quarterdeck InternetSuite.iso / qsockpro.qip / EARTHLNK.MPS < prev    next >
Encoding:
Text File  |  1996-03-20  |  1.5 KB  |  71 lines

  1. # EarthLink Network, Inc.
  2. # PPP login script
  3. # Copyright 1995 Quarterdeck Corporation
  4. # Authored 6/16/95 kflick@netcom.com
  5. # MPS Script for EarthLink Network, Inc.
  6. #define the variables we will need
  7.  
  8. STRING username
  9. STRING password
  10. STRING framing
  11. STRING IPAddress
  12.  
  13. # uncomment for debugging
  14.  
  15. #TRACE ON
  16.  
  17. # reset maximum login timeout.
  18.  
  19. SetTimeout 90
  20.  
  21. CfgGetValue "Username" username
  22.  
  23. IF result = 0 THEN
  24.     GetInput "Enter your user name" username
  25.     IF result = 0 THEN
  26.         PRINT "Warning, no username entered"
  27.     ELSE
  28.         PRINT "Username set to ["; username; "]"
  29.     ENDIF
  30. ENDIF
  31.  
  32. # get password from access method
  33.  
  34. CfgGetValue "Password" password
  35. # if the Password field is empty, prompt the user for it.
  36.  
  37. IF result = 0 THEN
  38.     GetPassword "Enter your password" password
  39.     IF result = 0 THEN
  40.         PRINT "Warning, no password entered"
  41.     ELSE
  42.     # NOTE: Don't print password.
  43.         PRINT "Password set."
  44.     ENDIF
  45. ENDIF
  46.  
  47. CfgGetValue "Framing" framing
  48. IF result = 0 THEN
  49.     Abort "Can't load framing (ppp or slip) from qdeck.ini"
  50. ENDIF
  51.  
  52. CommWaitFor "login"         # wait for login prompt
  53.     #delay 5
  54.     CommSend username         # send user name
  55.     CommSend "%r"             # send carriage return
  56. CommWaitFor "assword"         # wait for password prompt
  57.     #delay 5
  58.     CommSend password         # send password
  59.     CommSend "%r"             # send carriage return
  60.  
  61. IF framing = "MPSLIP" THEN
  62.     CommWaitFor "to "         # wait for ip address
  63.     CommReadIPAddr IPAddress
  64.     IF result > 0 THEN
  65.         CfgSetValue "IPAddress" IPAddress
  66.         PRINT "%rIP Address set to ["; IPAddress; "]"
  67.     ENDIF
  68. ENDIF
  69.  
  70. END
  71.